<?php

namespace common\models\member;

use common\models\common\BaseModel;

class Superior extends BaseModel
{

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%member_superior}}';
    }

    public function getMember(){
        return $this->hasOne(MemberInfo::className(),['id'=>'member_id'])->select('id,nickname,head_portrait,mobile');
    }

    public function getSuperiorobj1(){
        return $this->hasOne(MemberInfo::className(),['id'=>'superior1'])->select('id,nickname,head_portrait,mobile');
    }

    public function getSuperiorobj2(){
        return $this->hasOne(MemberInfo::className(),['id'=>'superior2'])->select('id,nickname,head_portrait,mobile');
    }

    public function getSuperiorobj3(){
        return $this->hasOne(MemberInfo::className(),['id'=>'superior3'])->select('id,nickname,head_portrait,mobile');
    }
}